<template>
    <!-- index.vue -->
</template>

<script setup>
	import { ref, onMounted,getCurrentInstance } from 'vue';
  import { useBdStore } from '@/stores/bdStore.js';
  const useStore = useBdStore()
  import tools from "../until.js";
	import { useRouter } from 'vue-router'

 	const router = useRouter();


  onMounted(() => {
    setTimeout(() => {
       init()
    }, 300)
  })

const init = async () => {
   return  router.push({ path: '/BdList' });
  // let verfiyRet = await tools.verfiyAppCdKey()
  // if (verfiyRet==200) {
  //      return  router.push({ path: '/BdList' });
  // }
  // if (verfiyRet==-1000 ) {
  //    //未输入key，试用期
  //     if (false ==  await tools.disclaimerFunc()) {
  //       return router.push({path: '/Disclaimer'});
  //     }
  //     let first_status = await tools.getpyFirstTime(30)
  //
  //     if (first_status['status']) {
  //         useStore.setAppUsageTimeTxt(first_status['msg'], 2)
  //         return  router.push({ path: '/BdList' });
  //     } else {
  //         useStore.setAppUsageTimeTxt(first_status['msg'], 1)
  //         return  router.push({ path: '/Register' });
  //     }
  // }
  // if ( verfiyRet==-1001) {
  //       //key过期
  //      if (false ==  await tools.disclaimerFunc()) {
  //          return  router.push({ path: '/Disclaimer' });
  //      } else {
  //         return  router.push({ path: '/Register' });
  //      }
  // }

}
</script>  